import request from '../utils/request';

export function test() {
  return request({
    url: '/map/list',
    method: 'get'
  });
}

// 添加位置信息
export function addPos(params) {
  return request({
    url: '/map/addPos',
    method: 'get',
    params
  });
}

// 查询所有位置信息
export function getAllPos() {
  return request({
    url: '/map/allPos',
    method: 'get'
  });
}

// 查询某个位置信息
export function getPosByName(params) {
  return request({
    url: '/map/getPosByName',
    method: 'get',
    params
  });
}

// 搜索附近的位置信息
export function nearbySearch(params) {
  return request({
    url: '/map/nearbySearch',
    method: 'get',
    params
  });
}

export function postUserInfo(data) {
  return request({
    url: '/userInfo',
    method: 'post',
    data
  });
}

export function deleteUser(data) {
  return request({
    url: '/user/delete',
    method: 'post',
    data
  });
}
